package ro.prjmanager.core.service;


public class Order {
    String property;
    String alias;
    boolean asc;

    public Order(String property, String alias, boolean asc) {
        this.property = property;
        this.alias = alias;
        this.asc = asc;
    }

    public Order(String property, boolean asc) {
        this.property=property.substring(property.indexOf(".")+1);       
        this.alias=property.substring(0,property.indexOf("."));
        this.asc = asc;
    }

    public String getProperty() {
        return property;
    }

    public void setProperty(String property) {
        this.property = property;
    }

    public boolean isAsc() {
        return asc;
    }

    public void setAsc(boolean asc) {
        this.asc = asc;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }
}
